const studentModel = require('../dao/student.js');

module.exports={
    //学生列表
    async AccordingToStudents(){
        return await studentModel.ShowAllStudents();
    },
    //添加学生
    async Addstudents(username, age,gender,score,address){
        return await studentModel.AddStudent(username, age,gender,score,address);
    },
    //删除学生
    async Delstudents(studentId){
        return await studentModel.DelStudentsId({'_id':studentId});
    },
    //查询学生
    async detailStudents(studentId){
        return await studentModel.getStudentsId(studentId);
    },
     //修改学生
     async updataStudents({'_id':studentId},{name, age,gender,score,address}){
        return await studentModel.updStudentsId({'_id':studentId},{name, age,gender,score,address});
    },
}